const urlBase = 'http://116.62.186.119/'

export const getRequest = (url, data) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: urlBase + url,
			method: 'GET',
			data,
			success: res => {
				if(res.data.statusCode === 200){
					return resolve(res)
				}else{
					reject(res.data.message)
				}
			},
			fail: () => {
				reject('骚凹瑞～请求异常')
				uni.showToast({
					title: '骚凹瑞～请求异常',
					icon: 'none',
				})
			}
		})
	})
}

